]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
pageIndicator: Add getter for current number of pages
authorGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Mon, 25 May 2020 19:51:26 +0000 (16:51 -0300)
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Thu, 18 Jun 2020 13:54:31 +0000 (10:54 -0300)
Add a getter to PageIndicators to retrieve the number of pages
it currently displays.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1271

js/ui/pageIndicators.js

index 09186ed2c10c9e8cd0fdb854dcf0103392e0cd7e..8ac44d4b2b8a8622edd08fbe3f3750cd7b9424c0 100644 (file)
@@ -120,6 +120,10 @@ var PageIndicators = GObject.registerClass({
         for (let i = 0; i < children.length; i++)
             this._updateIndicator(children[i], i);
     }
+
+    get nPages() {
+        return this._nPages;
+    }
 });
 
 var AnimatedPageIndicators = GObject.registerClass(